# config.py

import os



HOSTNAME = '127.0.0.1'

PORT = 3306

USERNAME = 'root'

PASSWORD ='123456'

DATABASE ='videos'

DB_URI = f'mysql+pymysql://{USERNAME}:{PASSWORD}@{HOSTNAME}:{PORT}/{DATABASE}?charset=utf8'
SQLALCHEMY_DATABASE_URI = DB_URI

AI_ANALYSIS_API='abc'


basedir = os.path.abspath(os.path.dirname(__file__))
# 前端视频目录 (根据你的前端项目设置)
# 示例：项目根目录下的 frontend_videos 文件夹

BACKEND_ROOT=os.path.join(basedir,'video')
os.makedirs(BACKEND_ROOT,exist_ok=True)

FRONTEND_VIDEO_PATH = os.path.join(basedir, 'frontend_videos')
os.makedirs(FRONTEND_VIDEO_PATH, exist_ok=True) # 确保目录存在

# --- Flask 应用密钥 ---
SECRET_KEY = 'your-very-secret-and-long-key-change-this' # 务必修改为复杂密钥

# 可以添加其他配置...
PER_PAGE = 20